#! /bin/bash

# 放在/bin/目录下直接执行 myprint命令

MY_NAME=$0

show_name()
{
   echo "my shell  name : ${MY_NAME}"
}

print_name()
{
  parame1=$1
  if [ -z $2 ]; then
      echo "print name : $2"
    else
       filepath=$1
  fi
}

while [ -n "$1" ]
do 
    if [ $? -eq 1 ]; then
		echo "command $1 is not available."
		exit 1
	fi
	case "$1" in
	--show)	        
		show_name
		shift
		shift
		break
        ;;
	--print)
		print_name $2
		shift
		shift
		break
		;;
	esac	
done	